package com.wenx.v3system.modular.cloud.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.*;

/**
 * 用户注册DTO
 */
@Data
@Schema(description = "用户注册请求")
public class UserRegisterDto {



    @NotBlank(message = "用户名不能为空")
    @Size(min = 2, max = 50, message = "用户名长度必须在2-50个字符之间")
    @Schema(description = "用户名", example = "测试用户")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 100, message = "密码长度必须在6-100个字符之间")
    @Schema(description = "密码", example = "123456")
    private String password;

    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱", example = "test@example.com")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号", example = "13888888888")
    private String phone;

    @Min(value = 0, message = "性别值不正确")
    @Max(value = 2, message = "性别值不正确")
    @Schema(description = "性别 (0-女, 1-男, 2-未知)", example = "1")
    private Integer gender;

    @Min(value = 1, message = "年龄必须大于0")
    @Max(value = 150, message = "年龄不能超过150")
    @Schema(description = "年龄", example = "25")
    private Integer age;

    @Size(max = 500, message = "描述长度不能超过500个字符")
    @Schema(description = "个人描述", example = "这是一个测试用户")
    private String description;

    @NotBlank(message = "验证码不能为空")
    @Schema(description = "图形验证码", example = "1234")
    private String captcha;

    @NotBlank(message = "验证码UUID不能为空")
    @Schema(description = "验证码UUID", example = "uuid-1234-5678")
    private String captchaUuid;
} 